package com.example.com.common.widget.diffui;

import android.support.v7.util.DiffUtil;

/**
 * Created by ChenYiYao on 2018/8/23.
 */
public class DiffUiFactory {
    public static  <T extends DiffUtil.Callback> T getIntence(Class<T> tClass) {
        DiffUtil.Callback p = null;
        try {
            p = (DiffUtil.Callback) Class.forName(tClass.getName()).newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return (T) p;

    }

}
